FROM anapsix/alpine-java:8_server-jre_unlimited

MAINTAINER zc(15063718053@163.com)

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

RUN apk add --no-cache tzdata && ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

RUN mkdir -p /opt/projects/sealtalk-server

WORKDIR /opt/projects/sealtalk-server

EXPOSE 7080

ADD /target/sealtalk-server-1.0.0-SNAPSHOT.jar ./

CMD java -jar -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -Dspring.profiles.active=prod sealtalk-server-1.0.0-SNAPSHOT.jar